package com.ybkj.daijia.server.mapper;

import com.ybkj.daijia.server.model.DriverRebatePaymentRecord;
import java.math.BigDecimal;
import java.util.List;
import org.apache.ibatis.annotations.Param;

/**
 * @author zhyu
 * @date
 */
public interface DriverRebatePaymentRecordMapper {

    void insertRecord(DriverRebatePaymentRecord rebatePaymentRecord);

    DriverRebatePaymentRecord selectByPrimaryKey(@Param("id") Long id);

    List<DriverRebatePaymentRecord> listIndexPayments(@Param("start") String start,
        @Param("end") String end, @Param("driverId") Long driverId,
        @Param("recordType") String recordType, @Param("page") Integer page,
        @Param("size") Integer size);

    DriverRebatePaymentRecord findOrderRecharge(@Param("driverId") Long driverId);

    BigDecimal sumRebateByEmployWithDate(@Param("start") String start, @Param("end") String end,
        @Param("driverId") Long driverId);

    Long countByEmploy(@Param("driverId") Long driverId, @Param("start") String start,
        @Param("end") String end, @Param("recordType") String recordType);

    List<DriverRebatePaymentRecord> selectByRecordTypeAndOrder(
        @Param("recordType") String recordType);

    int deleteByPrimaryKey(@Param("id") Long id);

    int deleteByDriverId(@Param("driverId") Long driverId);

    int updateByPrimaryKey(DriverRebatePaymentRecord driverRebatePaymentRecord);
}
